The present invention relates to the field of semiconductor and dielectric material and devices and to a method of production of such devices. The devices and method may be utilized in the fields of electronics, microelectronics, optoelectronics, electrooptics and related fields. The method of the invention permits improvement of the electrical, photoelectric, optical, luminescent, noise and mechanical parameters of such devices, decreases the level of internal residual stress in heterostructures, and increases the devices' lifetime and the stability of their parameters by changing the defect structure of semiconductor and dielectric materials in a controlled and repeated manner.